-
Notifications
You must be signed in to change notification settings - Fork 7
Default dev to http. Replace dev/prod profiles with compose override file #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f70605a to
35ec8aa
Compare
01305e3 to
8391bd6
Compare
|
I've been testing this and I had to run docker compose up -d a few times for the site to come up. The drupal container fails running docker compose up the first time. Then I run it again and drupal starts as well as solr. I think that issue is that solr is not starting the first time around and that is what is making the drupal container fail. Update: the docker compose file says solr depends on a healthy drupal container so maybe the failure is caused by something else. Currently I can't log in to drupal as admin (using password.) So I tried several of the passwords in the secrets folder (including the drupal default account password) and nothing will work. I will try to debug more tomorrow. |
93c9c6c to
43d08a4
Compare
and add make commands to switch between http, https-mkcert, and https-acme
9ee3b9e to
cd81247
Compare
|
Great!
As mentioned above, since the init scripts that call generate secrets/certs runs in a new |
6df685d to
da3e48c
Compare
da3e48c to
3f6fb64
Compare
|
Just tested this again and I'm getting an error with the drupal container: Docker ps shows that there is no solr container which makes sense since drupal is marked unhealthy. |
|
I ran make status: JWT key pair: Valid: secrets/JWT_PUBLIC_KEY and secrets/JWT_PRIVATE_KEY match --- Traefik Status --- HTTP port: 80 So I ran this: I will test this again making the override file first then running make up. |
|
I made a fresh isle-site-template and ran this: |
|
@aOelschlager - are you on the latest version of this PR? |
|
ah i neglected to update the helper text 364f760 |
|
I noticed that I should be using the dev as the override file shortly after my last comment. I tested it again and the drupal container was unhealthy. I shelled into the contain and the permissions were mixed. Some had nginx:nginx and some had 100:nginx. I'll test it again and see if that is reproducible. |
dff5d05 to
2b39ed2
Compare
Coincides with Islandora-Devops/isle-buildkit#519
2b39ed2 to
81e37f8
Compare
aOelschlager
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UID removal fixed the permission issues I was having that prevented the Drupal container from running as noted in my previous comments. This works and was super easy to run!
This PR started as just removing docker compose profiles from docker-compose.yaml but has morphed into basically a rewrite of ISLE Site Template...
The original motivating factor for removing profiles was to make production and dev environments as identical as possible. The way we're using profiles (same services with different config set using profiles) is antithetical to that general idea. Having profiles was arguably necessary when we had codeserver, but now that codeserver has been removed there's little value to splitting our docker-compose.yaml into profiles
Related links
devprofile. This has tripped me up before and someone else raised the issueAdditional changes
Default HTTP
While I was at it I also made a few more changes to make getting started easier. Namely, I made the default dev environment use
httprather thanhttps. We've had quite a few GitHub issues and Slack messages related tomkcertthat forcing TLS for dev environments just doesn't seem to be making the DX any better. Additionally, some folks have TLS terminated in front of ISLE (having ISLE act as a backend on a frontend reverse proxy) so having better support around switching from TLS to HTTP seemed warranted. To help with this I added some newmakecommands to allow switching between http, tls-mkcert, and tls-acme easier.Default domain
Using
httpalso forced moving away fromislandora.dev... HSTS rules in Google Chrome in particular do not allow accessing*.devdomains over http.traefik labels to YML
I also moved the traefik labels from docker compose and into dynamic template to make these different options easier to configure.
init service
Instead of running the
generate-secrets.shandgenerate.certs.shon the host machine, I made aninitservice that runs this usingislandora/base.smart port allocation
make uptries to bring up ISLE on port 80/443 but if those ports are bound by some other process than the compose project it tries to bind to another port. The URL is then automatically opened in the web browser.bind mount the entire drupal root
Instead of bind mounting subsets of the host's filesystem into the container's
/var/www/drupaldirectory, havemake buildhandle syncing between the two to make for a better DXComposite Action
The integration test ran in GitHub Actions is now a composite action so we can run the same action in other repos to easily setup a site template instance for testing.
Batteries included
Instead of a setup script, just keep this repo up to date with islandora-starter-site. This will allow us to add the green "use this template" button on this repo and people will be able to copy isle-site-template with the latest islandora-starter-site into their own github repo (as opposed to forking). This makes setting up a site easier. Just copy this template repo (or checkout this repo) and run
make init upmake status
Added a command to clue folks into common misconfiguration settings
Testing
Checkout this PR and run
and you should have your own copy of isle-site-template
Before merging
This is a big change and if approved will need a lot of docs updates (in this repo's README and in islandora/documentation). As well as updating GitHub Actions for those that leverage site template (namely islandora-starter-site and workbench). I'll do this after this PR gets reviewed. And we probably could turn this repo into a template repository